<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        console.log([] == 0)  //先通过valueOf转一般都是本身 []通过Array.prototype.toString  []=>''=>0  等于true
        console.log(![] == 0)  // 布尔值 0 NaN False '' undefined null +0 -0  []是数组  等于true
        console.log([] == ![]) // 0 0 true
        console.log([] == [])  //false  
        console.log({} == !{}) //false  Object.prototype.toString '[Object Objedct]' NaN
        console.log({} == {})//false
    </script>
</body>

</html>